package com.freewater.springboot.demo.resource.classpathresource;

import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

public class Main {
    public static void main(String[] args) throws IOException {
        Resource resource = new ClassPathResource("application.properties");
        Properties properties = new Properties();
        properties.load(new FileReader(resource.getFile()));
        System.out.println(properties);
    }
}
